package com.durian.domain.DTO;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.*;

import java.io.Serializable;

/**
 * 添加订单与书籍关联表 DTO
 *
 * @author Durian
 * @since 2023-12-12
 */
@Data
@Builder
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class ObsOrderBookAddDTO implements Serializable {

    /**
     * 书籍id
     */
    @Positive(message = "书籍id格式有误")
    @NotNull(message = "书籍id不能为空")
    private Long bookId;

    /**
     * 书籍的数量
     */
    private Integer bookCount;
}
